home *** CD-ROM | disk | FTP | other *** search
- unit Bookc;
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, StdCtrls, Buttons, ExtCtrls;
-
- type
- BookRec=Record
- FilN:String[12];
- end;
- TForm3 = class(TForm)
- ScrollBox1: TScrollBox;
- Image1: TImage;
- Label1: TLabel;
- BitBtn1: TBitBtn;
- BitBtn2: TBitBtn;
- Label2: TLabel;
- Image2: TImage;
- Image3: TImage;
- ScrollBox2: TScrollBox;
- Image4: TImage;
- procedure Image3Click(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- procedure Image2Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
-
- end;
-
- var
- Form3: TForm3;
- SearchRec:TSearchRec;
- BR:BookRec;
- BookF:File of BookRec;
- Check:Integer;
- trans:integer;
- dire:String;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm3.Image3Click(Sender: TObject);
- var
- ST:String;
- begin
- If (trans>=0) and (trans<FileSize(bookF)) then
- begin
- trans:=trans+1;
- If trans<>fileSize(booKF) then
- st:=dire+'\PEN2\P'+IntToStr(trans+1)+'.bmp';
- Form3.image4.picture.loadfromfile(ST);
- seek(BookF,trans);
- Read(BookF,BR);
- Form3.image1.picture.loadfromfile(dire+'\pen\'+BR.FilN);
- Form3.label2.caption:=Br.FilN;
- End;
- end;
-
- procedure TForm3.FormCreate(Sender: TObject);
- var
- st:String;
- f2:TextFile;
- begin
- AssignFile(f2,'c:\c1.c');
- reset(f2);
- readln(f2,dire);
- closefile(f2);
- AssignFile(BookF,dire+'\bookfile.ps');
- {$i-}
- Reset(BookF);
- {$I+}
- If FileSize(BookF)>0 then
- begin
- st:=dire+'\PEN2\P'+IntToStr(1)+'.bmp';
- Form3.image4.picture.loadfromfile(ST);
- seek(BookF,0);
- Read(BookF,BR);
- Form3.Image1.picture.loadfromFile(dire+'\pen\'+BR.FilN);
- Form3.label2.caption:=Br.FilN;
- trans:=0;
- End;
- end;
- procedure TForm3.Image2Click(Sender: TObject);
- VAR
- ST:STRING;
- begin
- If (trans>0) and (Trans<=FileSize(bookF)) then
- begin
- trans:=trans-1;
- st:=dire+'\PEN2\P'+IntToStr(TRAnS+1)+'.bmp';
- Form3.image4.picture.loadfromfile(ST);
- seek(BookF,trans);
- Read(BookF,BR);
- Form3.image1.picture.loadfromfile(dire+'\pen\'+BR.FilN);
- Form3.label2.caption:=Br.FilN;
- End;
-
- end;
-
- end.
-